//-------------Sonic CD R2 1 A Ani Tiles Script---------------//
//-------------------Scripted by Twanvanb1------------------//

// Priority
#alias 1	:	PRIORITY_ACTIVE

// ========================
// Main Subs
// ========================

sub ObjectMain
	Object.AnimationTimer++
	if Object.AnimationTimer == 10
		Object.AnimationTimer = 0
		Object.Frame += 6
		Object.Frame %= 24

		TempValue0 = 495
		TempValue0 += Object.Frame

		TempValue1 = 489
		while TempValue1 <= 494
			Copy16x16Tile(TempValue1, TempValue0)
			TempValue0++
			TempValue1++
		loop
	end if
end sub

sub ObjectStartup
	Object[18].Type = TypeName[Block Animation]
	Object[18].Priority = PRIORITY_ACTIVE
end sub

// ========================
// Editor Subs
// ========================

sub RSDKDraw
	DrawSprite(0)
end sub


sub RSDKLoad
	LoadSpriteSheet("Global/Display.gif")
	SpriteFrame(-16, -16, 32, 32, 1, 143)		// #0 - "Script" Icon

	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end sub